package com.buoy.base.aluminumpricespider.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@TableName("base_metal_price")
public class BaseMetalPrice {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    @TableField("average_price")
    private int averagePrice;
    
    @TableField("price_date")
    private LocalDate priceDate;
    
    @TableField("price_source")
    private String priceSource; // 'changjiang' 或 'shanghai'
    
    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField("manual_update")
    private int manualUpdate = 0;
    
    @TableField(exist = false)
    private Integer threeDayAvgPrice; // 前三天均价
    
    @TableField(exist = false)
    private Integer fiveDayAvgPrice; // 前五天均价
} 